home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
adatutor
/
adawkbk
/
sol2-10.ada
< prev
next >
Wrap
Text File
|
1996-01-30
|
482b
|
26 lines
-- Problem 2.10
-- by Rick Conn
with Text_IO;
procedure Main is
I, J : INTEGER;
package Int_IO is new Text_IO.Integer_IO (INTEGER);
begin -- Main
loop
Text_IO.Put ("Enter 2 numbers (0 0 to quit): ");
Int_IO.Get (I); Int_IO.Get(J);
Text_IO.New_Line;
exit when I = 0 and J = 0;
if J /= 0 and then I/J > 0 then
Int_IO.Put (I/J);
else
Text_IO.Put ("Zero");
end if;
Text_IO.New_Line;
end loop;
end Main;